package com.supercube.wechat.service.impl;

import com.supercube.wechat.dao.AppointmentMapper;
import com.supercube.wechat.domain.Appointment;
import com.supercube.wechat.service.AppointmentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 预约服务层实现
 *
 * @author djzhao
 * @time 2019/11/7 16:07
 */
@Service
public class AppointmentServiceImpl implements AppointmentService {

    @Autowired
    private AppointmentMapper appointmentMapper;

    @Override
    public boolean submit(Appointment appointment) {
        appointment.setId(null);
        return appointmentMapper.insert(appointment) > 0;
    }
}
